Skip to content

Fix container name in ScriptBlock BeforeAll failures (fixes #2636). #2637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

davidmatson
Copy link
Contributor

@davidmatson davidmatson commented Apr 8, 2025

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

Replace Result.Item with Result.Name to handle the ScriptBlock case.

@davidmatson
Copy link
Contributor Author

davidmatson commented Apr 8, 2025

OLD: This PR is still a draft and not yet ready to be merged. There's one test failure that I don't understand. If a maintainer knows the right change here, please feel free to edit.

| - Running in PSHost without UI 
[n] - Executes successfully without errors -> Expected not $null but got $null. 
  at Verify-NotNull, /Users/runner/work/1/s/tst/axiom/Verify-NotNull.ps1:8 
  at <ScriptBlock>, /Users/runner/work/1/s/tst/Pester.RSpec.InNewProcess.ts.ps1:387 
  at t, /Users/runner/work/1/s/tst/p.psm1:110 
  at <ScriptBlock>, /Users/runner/work/1/s/tst/Pester.RSpec.InNewProcess.ts.ps1:374 
  at b, /Users/runner/work/1/s/tst/p.psm1:80 
  at <ScriptBlock>, /Users/runner/work/1/s/tst/Pester.RSpec.InNewProcess.ts.ps1:372 
  at i, /Users/runner/work/1/s/tst/p.psm1:45 
  at <ScriptBlock>, /Users/runner/work/1/s/tst/Pester.RSpec.InNewProcess.ts.ps1:19 
  at <ScriptBlock>, /Users/runner/work/1/s/test.ps1:93 
  at <ScriptBlock>, /Users/runner/work/1/s/test.ps1:86 
  at <ScriptBlock>, /Users/runner/work/_temp/66f25778-d7a2-4923-949a-c5761f8e13bd.ps1:3 
  at <ScriptBlock>, <No file>:1 

EDIT: Found the answer; see below.

@davidmatson
Copy link
Contributor Author

I figured out why that one test was failed and made an edit to get it to pass. I think the PR is ready to now.

@davidmatson davidmatson marked this pull request as ready for review April 8, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant